﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Remind.View.Properties;

namespace Remind.View
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            //判断是否自定义数据库目录
            if (!Settings.Default.custspath)
            {
                //默认数据库存放路径
                string dbpath = Application.StartupPath + "\\Data\\联系人.mdb";
                FrmPws.SetValue("database", dbpath);
            }
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (Settings.Default.runPwd)
            {
                frmLogin frm = new frmLogin();
                if (frm.ShowDialog() == DialogResult.OK)
                    Application.Run(new frmMain());
            }
            else
            {
                Application.Run(new frmMain());
            }
        }
    }
}
